package pro.cherish.quartzlockdemo.da;

import com.sun.istack.internal.logging.Logger;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import pro.cherish.quartzlockdemo.util.TaskUtils;

public class QuartzJobFactory implements Job {
    public final Logger log = Logger.getLogger(this.getClass());


    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        ScheduleJob scheduleJob = (ScheduleJob) context.getMergedJobDataMap().get("scheduleJob");
        TaskUtils.invokMethod(scheduleJob);
    }
}